package com.daedalus.Polimorfizmi.InterfaceAbstractShape;

public class Sphere extends ThreeDimensionalShape{

	public Sphere(double dim) {
		super(dim);
	}

	@Override
	public double getArea() {
		return Math.pow(getDimension(),2)*Math.PI*4.0/3.0;
	}
	@Override
	public double getVolume() {
		return Math.pow(getDimension(), 3)*4.0*Math.PI/3.0;
	}

	public String toString(){
		return String.format("Object : Sphere  \n Radius: %.2f",getDimension());
	}
	
}
